<template>
	<view>
		<view class="header u-flex">
			<text class="cancel" @click="close">取消</text>
			<view class="u-flex-1"></view>
			<!-- <text class="confirm" @click="confirm">确定</text> -->
		</view>
		<u-cell-group class="u-m-b-20">
			<u-cell-item :title="res.name" v-for="(res, index) in list" :key="res.id" :use-label-slot="true" @click="choose(res)">
				<view slot="label">
					<text>{{res.address}}</text>
					<!-- <text class="u-p-l-10">--</text> -->
				</view>
			</u-cell-item>
		</u-cell-group>
		<!-- <u-loadmore :status="loadStatus"></u-loadmore> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				loadStatus: 'loading'
			}
		},
		created() {
			//4状态为已回收
			this.getList()
		},
		methods: {
			// 页面数据
			getList() {
				this.loadStatus = "loading"
			
				return this.$u.post('/Store/InOrder/GetStore',{
					"pageIndex": 1,
					"pageSize": 999,
				}).then((res) => {
					res.forEach((item) => {
						this.list.push(item)
					})
					return res
				})
			},
			// 确定选择订单返回
			choose(item){
				this.$emit('confirm',item)
			},
			// 关闭窗口
			close(){
				this.$emit('close',false)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header{
		height: 100rpx;
		padding: 0 30rpx;
		.cancel{
			
		}
		.confirm{
			color: $u-color-main;
		}
	}
</style>
